#include<unistd.h>
#include<sys/socket.h>
#include<arpa/inet.h>
#include<netdb.h>
#include<iostream>
#include<cstdio>
#include<cstring>
#include<stdexcept>
//#include"sriTCPCLient.h"
#include"sri.h"

using namespace std;

int main(int argc, char *argv[])
{
//    sriTCPClient client;
//    if(client.ConnectToHost("192.168.0.108",4008)){
//        cout<<"successful connected"<<endl;
//    }

//    char buffer[1024];
//    memset(buffer,0,sizeof(buffer));
//    sprintf(buffer,"AT+GOD\r\n");
//    int sdlen=client.Send(buffer,sizeof(buffer));
//    cout<<"sdlen:"<<sdlen<<endl;
//    cout<<"send:"<<buffer<<endl;
//    cout<<"strlen:"<<strlen(buffer)<<endl;
//    cout<<"sizeof:"<<sizeof (buffer)<<endl;
//    memset(buffer,0,sizeof(buffer));


//    int rvlen=client.Recv(buffer,sizeof(buffer));
//    cout<<"rvlen:"<<rvlen<<endl;
//    cout<<"接收："<<buffer<<endl;

    unsigned char ch[4]={0x01,0x6A,0xF4,0xC0};
    float f;
    mempcpy(&f,ch,sizeof (ch));
    cout<<f<<endl;

    return 0;
}


